package yz;

import huan.circle;

public class Cone {
    private circle c;
    private static double h;
    double pi = 3.14;

    public Cone(double r, double H) {
        h = H;
        c = new circle(H);
    }

    public double GetArea() {
        double s = c.getArea() + pi * c.r * Math.sqrt(h * h + c.r);
        return s;
    }

    public double GetVoulume() {
        double V = (h * c.r * c.r * pi) / 3;
        return V;
    }
}